﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGeNurbCurve2d : OdGeSplineEnt2d
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGeNurbCurve2d(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGeNurbCurve2d_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGeNurbCurve2d obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGeNurbCurve2d()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGeNurbCurve2d(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public OdGeNurbCurve2d() : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_0(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(OdGeNurbCurve2d source) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_1(OdGeNurbCurve2d.getCPtr(source)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(int degree, OdGeKnotVector knots, OdGePoint2dArray controlPoints, bool isPeriodic) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_2(degree, OdGeKnotVector.getCPtr(knots), OdGePoint2dArray.getCPtr(controlPoints).Handle, isPeriodic), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(int degree, OdGeKnotVector knots, OdGePoint2dArray controlPoints) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_3(degree, OdGeKnotVector.getCPtr(knots), OdGePoint2dArray.getCPtr(controlPoints).Handle), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(int degree, OdGeKnotVector knots, OdGePoint2dArray controlPoints, OdGeDoubleArray weights, bool isPeriodic) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_4(degree, OdGeKnotVector.getCPtr(knots), OdGePoint2dArray.getCPtr(controlPoints).Handle, OdGeDoubleArray.getCPtr(weights), isPeriodic), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(int degree, OdGeKnotVector knots, OdGePoint2dArray controlPoints, OdGeDoubleArray weights) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_5(degree, OdGeKnotVector.getCPtr(knots), OdGePoint2dArray.getCPtr(controlPoints).Handle, OdGeDoubleArray.getCPtr(weights)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(int degree, OdGePolyline2d fitPolyline, bool isPeriodic) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_6(degree, OdGePolyline2d.getCPtr(fitPolyline), isPeriodic), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(int degree, OdGePolyline2d fitPolyline) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_7(degree, OdGePolyline2d.getCPtr(fitPolyline)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(OdGePoint2dArray fitPoints, OdGeVector2d startTangent, OdGeVector2d endTangent, bool startTangentDefined, bool endTangentDefined, OdGeTol fitTolerance) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_8(OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeVector2d.getCPtr(startTangent).Handle, OdGeVector2d.getCPtr(endTangent).Handle, startTangentDefined, endTangentDefined, OdGeTol.getCPtr(fitTolerance)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(OdGePoint2dArray fitPoints, OdGeVector2d startTangent, OdGeVector2d endTangent, bool startTangentDefined, bool endTangentDefined) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_9(OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeVector2d.getCPtr(startTangent).Handle, OdGeVector2d.getCPtr(endTangent).Handle, startTangentDefined, endTangentDefined), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(OdGePoint2dArray fitPoints, OdGeVector2d startTangent, OdGeVector2d endTangent, bool startTangentDefined) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_10(OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeVector2d.getCPtr(startTangent).Handle, OdGeVector2d.getCPtr(endTangent).Handle, startTangentDefined), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(OdGePoint2dArray fitPoints, OdGeVector2d startTangent, OdGeVector2d endTangent) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_11(OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeVector2d.getCPtr(startTangent).Handle, OdGeVector2d.getCPtr(endTangent).Handle), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(OdGePoint2dArray fitPoints, OdGeTol fitTolerance) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_12(OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeTol.getCPtr(fitTolerance)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(OdGePoint2dArray fitPoints) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_13(OdGePoint2dArray.getCPtr(fitPoints).Handle), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(OdGePoint2dArray fitPoints, OdGeVector2dArray fitTangents, OdGeTol fitTolerance, bool isPeriodic) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_14(OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeVector2dArray.getCPtr(fitTangents), OdGeTol.getCPtr(fitTolerance), isPeriodic), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(OdGePoint2dArray fitPoints, OdGeVector2dArray fitTangents, OdGeTol fitTolerance) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_15(OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeVector2dArray.getCPtr(fitTangents), OdGeTol.getCPtr(fitTolerance)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(OdGePoint2dArray fitPoints, OdGeVector2dArray fitTangents) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_16(OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeVector2dArray.getCPtr(fitTangents)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(OdGeEllipArc2d ellipse) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_17(OdGeEllipArc2d.getCPtr(ellipse)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(OdGeLineSeg2d linSeg) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_18(OdGeLineSeg2d.getCPtr(linSeg)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(OdGePoint2dArray fitPoints, OdGeVector2d startTangent, OdGeVector2d endTangent, bool startTangentDefined, bool endTangentDefined, OdGe.OdGeKnotParameterization knotParam, OdGeTol fitTol) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_19(OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeVector2d.getCPtr(startTangent).Handle, OdGeVector2d.getCPtr(endTangent).Handle, startTangentDefined, endTangentDefined, (int)knotParam, OdGeTol.getCPtr(fitTol)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeNurbCurve2d(OdGePoint2dArray fitPoints, OdGeVector2d startTangent, OdGeVector2d endTangent, bool startTangentDefined, bool endTangentDefined, OdGe.OdGeKnotParameterization knotParam) : this(GlobalsPINVOKE.new_OdGeNurbCurve2d__SWIG_20(OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeVector2d.getCPtr(startTangent).Handle, OdGeVector2d.getCPtr(endTangent).Handle, startTangentDefined, endTangentDefined, (int)knotParam), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public int numFitPoints()
		{
			int result = GlobalsPINVOKE.OdGeNurbCurve2d_numFitPoints(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool getFitPointAt(int index, OdGePoint2d point)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_getFitPointAt(this.swigCPtr, index, OdGePoint2d.getCPtr(point));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool getFitTolerance(OdGeTol fitTolerance)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_getFitTolerance(this.swigCPtr, OdGeTol.getCPtr(fitTolerance));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool getFitTangents(OdGeVector2d startTangent, OdGeVector2d endTangent)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_getFitTangents(this.swigCPtr, OdGeVector2d.getCPtr(startTangent).Handle, OdGeVector2d.getCPtr(endTangent).Handle);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool getFitData(OdGePoint2dArray fitPoints, OdGeTol fitTolerance, out bool tangentsExist, OdGeVector2d startTangent, OdGeVector2d endTangent)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_getFitData__SWIG_0(this.swigCPtr, OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeTol.getCPtr(fitTolerance), out tangentsExist, OdGeVector2d.getCPtr(startTangent).Handle, OdGeVector2d.getCPtr(endTangent).Handle);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool getFitData(OdGePoint2dArray fitPoints, OdGeTol fitTolerance, out bool tangentsExist, OdGeVector2d startTangent, OdGeVector2d endTangent, out OdGe.OdGeKnotParameterization knotParam)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_getFitData__SWIG_1(this.swigCPtr, OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeTol.getCPtr(fitTolerance), out tangentsExist, OdGeVector2d.getCPtr(startTangent).Handle, OdGeVector2d.getCPtr(endTangent).Handle, out knotParam);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool getFitKnotParameterization(out OdGe.OdGeKnotParameterization knotParam)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_getFitKnotParameterization(this.swigCPtr, out knotParam);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getDefinitionData(out int degree, out bool rational, out bool periodic, OdGeKnotVector knots, OdGePoint2dArray controlPoints, OdGeDoubleArray weights)
		{
			GlobalsPINVOKE.OdGeNurbCurve2d_getDefinitionData(this.swigCPtr, out degree, out rational, out periodic, OdGeKnotVector.getCPtr(knots), OdGePoint2dArray.getCPtr(controlPoints).Handle, OdGeDoubleArray.getCPtr(weights));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public int numWeights()
		{
			int result = GlobalsPINVOKE.OdGeNurbCurve2d_numWeights(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double weightAt(int weightIndex)
		{
			double result = GlobalsPINVOKE.OdGeNurbCurve2d_weightAt(this.swigCPtr, weightIndex);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool evalMode()
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_evalMode(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool getParamsOfC1Discontinuity(OdGeDoubleArray arg0, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_getParamsOfC1Discontinuity__SWIG_0(this.swigCPtr, OdGeDoubleArray.getCPtr(arg0), OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool getParamsOfC1Discontinuity(OdGeDoubleArray arg0)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_getParamsOfC1Discontinuity__SWIG_1(this.swigCPtr, OdGeDoubleArray.getCPtr(arg0));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool getParamsOfG1Discontinuity(OdGeDoubleArray arg0, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_getParamsOfG1Discontinuity__SWIG_0(this.swigCPtr, OdGeDoubleArray.getCPtr(arg0), OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool getParamsOfG1Discontinuity(OdGeDoubleArray arg0)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_getParamsOfG1Discontinuity__SWIG_1(this.swigCPtr, OdGeDoubleArray.getCPtr(arg0));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool setFitPointAt(int index, OdGePoint2d point)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_setFitPointAt(this.swigCPtr, index, OdGePoint2d.getCPtr(point));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool addFitPointAt(int index, OdGePoint2d point)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_addFitPointAt(this.swigCPtr, index, OdGePoint2d.getCPtr(point));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool deleteFitPointAt(int index)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_deleteFitPointAt(this.swigCPtr, index);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool setFitTolerance(OdGeTol fitTol)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_setFitTolerance__SWIG_0(this.swigCPtr, OdGeTol.getCPtr(fitTol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool setFitTolerance()
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_setFitTolerance__SWIG_1(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool setFitTangents(OdGeVector2d startTangent, OdGeVector2d endTangent)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_setFitTangents(this.swigCPtr, OdGeVector2d.getCPtr(startTangent).Handle, OdGeVector2d.getCPtr(endTangent).Handle);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool setFitKnotParameterization(OdGe.OdGeKnotParameterization knotParam)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_setFitKnotParameterization(this.swigCPtr, (int)knotParam);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d setFitData(OdGePoint2dArray fitPoints, OdGeVector2d startTangent, OdGeVector2d endTangent, OdGeTol fitTol)
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_setFitData__SWIG_0(this.swigCPtr, OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeVector2d.getCPtr(startTangent).Handle, OdGeVector2d.getCPtr(endTangent).Handle, OdGeTol.getCPtr(fitTol)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d setFitData(OdGePoint2dArray fitPoints, OdGeVector2d startTangent, OdGeVector2d endTangent)
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_setFitData__SWIG_1(this.swigCPtr, OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeVector2d.getCPtr(startTangent).Handle, OdGeVector2d.getCPtr(endTangent).Handle), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d setFitData(OdGeKnotVector fitKnots, OdGePoint2dArray fitPoints, OdGeVector2d startTangent, OdGeVector2d endTangent, OdGeTol fitTol, bool isPeriodic)
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_setFitData__SWIG_2(this.swigCPtr, OdGeKnotVector.getCPtr(fitKnots), OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeVector2d.getCPtr(startTangent).Handle, OdGeVector2d.getCPtr(endTangent).Handle, OdGeTol.getCPtr(fitTol), isPeriodic), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d setFitData(OdGeKnotVector fitKnots, OdGePoint2dArray fitPoints, OdGeVector2d startTangent, OdGeVector2d endTangent, OdGeTol fitTol)
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_setFitData__SWIG_3(this.swigCPtr, OdGeKnotVector.getCPtr(fitKnots), OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeVector2d.getCPtr(startTangent).Handle, OdGeVector2d.getCPtr(endTangent).Handle, OdGeTol.getCPtr(fitTol)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d setFitData(OdGeKnotVector fitKnots, OdGePoint2dArray fitPoints, OdGeVector2d startTangent, OdGeVector2d endTangent)
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_setFitData__SWIG_4(this.swigCPtr, OdGeKnotVector.getCPtr(fitKnots), OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeVector2d.getCPtr(startTangent).Handle, OdGeVector2d.getCPtr(endTangent).Handle), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d setFitData(int degree, OdGePoint2dArray fitPoints, OdGeTol fitTol)
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_setFitData__SWIG_5(this.swigCPtr, degree, OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeTol.getCPtr(fitTol)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d setFitData(int degree, OdGePoint2dArray fitPoints)
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_setFitData__SWIG_6(this.swigCPtr, degree, OdGePoint2dArray.getCPtr(fitPoints).Handle), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d setFitData(OdGePoint2dArray fitPoints, OdGeVector2d startTangent, OdGeVector2d endTangent, OdGe.OdGeKnotParameterization knotParam, OdGeTol fitTol)
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_setFitData__SWIG_7(this.swigCPtr, OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeVector2d.getCPtr(startTangent).Handle, OdGeVector2d.getCPtr(endTangent).Handle, (int)knotParam, OdGeTol.getCPtr(fitTol)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d setFitData(OdGePoint2dArray fitPoints, OdGeVector2d startTangent, OdGeVector2d endTangent, OdGe.OdGeKnotParameterization knotParam)
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_setFitData__SWIG_8(this.swigCPtr, OdGePoint2dArray.getCPtr(fitPoints).Handle, OdGeVector2d.getCPtr(startTangent).Handle, OdGeVector2d.getCPtr(endTangent).Handle, (int)knotParam), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool purgeFitData()
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_purgeFitData(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d addKnot(double newKnot)
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_addKnot(this.swigCPtr, newKnot), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d insertKnot(double newKnot)
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_insertKnot(this.swigCPtr, newKnot), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeSplineEnt2d setWeightAt(int controlPointIndex, double weight)
		{
			OdGeSplineEnt2d result = new OdGeSplineEnt2d(GlobalsPINVOKE.OdGeNurbCurve2d_setWeightAt(this.swigCPtr, controlPointIndex, weight), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d setEvalMode(bool evalMode)
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_setEvalMode__SWIG_0(this.swigCPtr, evalMode), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d setEvalMode()
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_setEvalMode__SWIG_1(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d joinWith(OdGeNurbCurve2d curve)
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_joinWith(this.swigCPtr, OdGeNurbCurve2d.getCPtr(curve)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d hardTrimByParams(double newStartParam, double newEndParam)
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_hardTrimByParams(this.swigCPtr, newStartParam, newEndParam), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d makeRational(double weight)
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_makeRational__SWIG_0(this.swigCPtr, weight), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d makeRational()
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_makeRational__SWIG_1(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d makeClosed()
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_makeClosed(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d makePeriodic()
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_makePeriodic(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d makeNonPeriodic()
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_makeNonPeriodic(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d makeOpen()
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_makeOpen(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d elevateDegree(int plusDegree)
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_elevateDegree(this.swigCPtr, plusDegree), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeNurbCurve2d Assign(OdGeNurbCurve2d spline)
		{
			OdGeNurbCurve2d result = new OdGeNurbCurve2d(GlobalsPINVOKE.OdGeNurbCurve2d_Assign(this.swigCPtr, OdGeNurbCurve2d.getCPtr(spline)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool addControlPointAt(double newKnot, OdGePoint2d point, double weight)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_addControlPointAt__SWIG_0(this.swigCPtr, newKnot, OdGePoint2d.getCPtr(point), weight);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool addControlPointAt(double newKnot, OdGePoint2d point)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_addControlPointAt__SWIG_1(this.swigCPtr, newKnot, OdGePoint2d.getCPtr(point));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool deleteControlPointAt(int index)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_deleteControlPointAt(this.swigCPtr, index);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool intersectWith(OdGeLine2d line2d, OdGePoint2dArray pnts2d, OdGeTol tol, OdGeDoubleArray arg3)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_intersectWith__SWIG_0(this.swigCPtr, OdGeLine2d.getCPtr(line2d), OdGePoint2dArray.getCPtr(pnts2d).Handle, OdGeTol.getCPtr(tol), OdGeDoubleArray.getCPtr(arg3).Handle);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool intersectWith(OdGeLine2d line2d, OdGePoint2dArray pnts2d, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_intersectWith__SWIG_1(this.swigCPtr, OdGeLine2d.getCPtr(line2d), OdGePoint2dArray.getCPtr(pnts2d).Handle, OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool intersectWith(OdGeLine2d line2d, OdGePoint2dArray pnts2d)
		{
			bool result = GlobalsPINVOKE.OdGeNurbCurve2d_intersectWith__SWIG_2(this.swigCPtr, OdGeLine2d.getCPtr(line2d), OdGePoint2dArray.getCPtr(pnts2d).Handle);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void set(int degree, OdGeKnotVector knots, OdGePoint2dArray controlPoints, OdGeDoubleArray weights, bool isPeriodic)
		{
			GlobalsPINVOKE.OdGeNurbCurve2d_set__SWIG_0(this.swigCPtr, degree, OdGeKnotVector.getCPtr(knots), OdGePoint2dArray.getCPtr(controlPoints).Handle, OdGeDoubleArray.getCPtr(weights), isPeriodic);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void set(int degree, OdGeKnotVector knots, OdGePoint2dArray controlPoints, OdGeDoubleArray weights)
		{
			GlobalsPINVOKE.OdGeNurbCurve2d_set__SWIG_1(this.swigCPtr, degree, OdGeKnotVector.getCPtr(knots), OdGePoint2dArray.getCPtr(controlPoints).Handle, OdGeDoubleArray.getCPtr(weights));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
